import {
	ICtrlActionResult,
	IMDCtrlAbility,
	IMDCtrlStoreBase,
	IParam,
} from '@/core';
import { IDECtrlController } from './i-de-ctrl-controller';

/**
 * 多数据部件控制器接口基类
 *
 * @export
 * @interface IMDCtrlController
 * @extends {IDECtrlController}
 */
export interface IMDCtrlControllerBase<
	S extends IMDCtrlStoreBase,
	A extends IMDCtrlAbility
> extends IDECtrlController<S, A> {
	/**
	 * 多数据部件数据加载
	 *
	 * @param {IParam} opts 加载参数
	 * @param {string} [tag] 加载标识
	 * @return {*}  {(Promise<ICtrlActionResult | void>)}
	 * @memberof IMDCtrlControllerBase
	 */
	load(opts: IParam, tag?: string): Promise<ICtrlActionResult | void>;

	/**
	 * 处理选中数据改变
	 *
	 * @param {IParam[]} selections
	 * @memberof IMDCtrlController
	 */
	handleSelectionChange(selections: IParam[]): void;

	/**
	 * 处理快速分组值变化
	 *
	 * @param {IParam} item
	 * @memberof IMDViewController
	 */
	handleQuickGroupValueChange(item: IParam): void;

	/**
	 * 搜索
	 *
	 * @param {string} searchValue
	 * @memberof IMDViewController
	 */
	search(searchValue: string): void;
}
